]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
st_widget_get_theme_node: g_error if called on an unparented widget
authorDan Winship <danw@gnome.org>
Wed, 17 Feb 2010 20:21:51 +0000 (15:21 -0500)
committerDan Winship <danw@gnome.org>
Wed, 10 Mar 2010 14:29:48 +0000 (09:29 -0500)
It's wrong to do anything that requires looking up a widget's style
before you add the widget to the stage, since its final style may
depend on properties inherited from its parents.
st_widget_get_theme_node() used to emit a warning in this case, but
many would-be contributors apparently didn't notice. Help them out.

https://bugzilla.gnome.org/show_bug.cgi?id=610279

src/st/st-widget.c

index 4a674c5be8b9b8223f9794a7d0757fe813e15f1f..08768f73be147c887e38333bfc08b1fd527a1eee 100644 (file)
@@ -1101,8 +1101,7 @@ st_widget_get_theme_node (StWidget *widget)
 
       if (stage == NULL)
         {
-          g_warning ("st_widget_get_theme_node called on a widget not in a stage");
-          stage = CLUTTER_STAGE (clutter_stage_get_default ());
+          g_error ("st_widget_get_theme_node called on a widget not in a stage");
         }
 
       if (parent_node == NULL)